package com.hotelvip.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * vip套餐商品 套餐关联表
 * @author Lzh
 * @date 2021/1/29 11:21
 */
@Data
@Accessors(chain = true)
@TableName("ht_vipcard_item")
public class VipCardItem extends Model<VipCardItem> {
    private static final long serialVersionUID=1L;
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "自增id",name = "id")
    private Long id;
    @ApiModelProperty(value = "vip(套餐)卡id/vip(用户)id",name = "vId")
    private Long vId;
    @ApiModelProperty(value = "v商品id",name = "vitemId")
    private Long vitemId;
    @ApiModelProperty(value = "含有的商品id",name = "itemId")
    private Long itemId;
    @ApiModelProperty(value = "商品标题",name = "itemTitle")
    private String itemTitle;
    @ApiModelProperty(value = "主图",name = "itemImage")
    private String itemImage;
    @ApiModelProperty(value = "以消费",name = "used")
    private String used;
    @ApiModelProperty(value = "商品价格(分)",name = "itemPrice")
    private Long itemPrice;
    @ApiModelProperty(value = "商品单位",name = "itemUnit")
    private String itemUnit;
    @ApiModelProperty(value = "商品权次",name = "itemNum")
    private Integer itemNum;
    @ApiModelProperty(value = "是否冻结FlagEnum枚举1是0否",name = "freeze")
    private Integer freeze;
    @ApiModelProperty(value = "本期数量",name = "usable")
    private Integer usable;
    @ApiModelProperty(value = "权次",name = "total")
    private Integer total;
    @ApiModelProperty(value = "总剩余",name = "total_s")
    private Integer total_s;
    @ApiModelProperty(value = "使用规则",name = "rule")
    private Integer rule;
    @ApiModelProperty(value = "数据类型",name = "type",notes = "判断是套餐还是会员卡消费信息0为套餐，1为会员卡消费信息")
    private Integer type;
    @ApiModelProperty(value = "冻结次数",name = "f_time")
    private Integer ftime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)  //新增有效
    private Date createdTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)	//新增和更新有效
    private Date updatedTime;

}
